<?php
if (isset($_GET['o']) &&  !empty($_GET['o']) ){
    include 'load.php';
    $openid=$_GET['o'];
    
    $mysqli = new mysqli($dbhost, $dbuser, $dbpwd, $dbName);
    if (!$mysqli->set_charset("utf8")) {}
    
    $query=$mysqli->query("SELECT phone FROM `uinfo` where openid='".$openid."' limit 0,1 ");
    if($query->num_rows>0){
        $getU=$query->fetch_array();
        $newPhone=substr($getU['phone'], 0,3).' '.substr($getU['phone'], 3,4).' '.substr($getU['phone'], 7);
        echo json_encode(array('msg'=>'ok','p'=>$newPhone));
    }else{
        echo json_encode(array('msg'=>'not'));
    }
    $mysqli->close();
    
    
}